home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13307 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.eiffel,comp.lang.c,comp.lang.c++,comp.object,comp.software-eng
  4. Subject: Re: Beware of "C" Hackers -- A rebuttal to Bertrand Meyer
  5. Date: 24 Mar 1996 14:12:21 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4j4hc5INNct5@keats.ugrad.cs.ubc.ca>
  8. References: <1995Jul3.034108.4193@rcmcon.com> <3154A548.71FF@iadfw.net> <4j3p80INN567@keats.ugrad.cs.ubc.ca> <3155786F.1262@iadfw.net>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <3155786F.1262@iadfw.net>, Larry Weiss  <lfw@iadfw.net> wrote:
  12. >Kazimir Kylheku wrote:
  13. > > Neither does the K&R2: this I think is a major flaw in the otherwise great
  14. > > book. It never makes clear the concept that the standard library is a component
  15. > > of the language. In fact, it claims the opposite:
  16. > > 
  17. > >         The standard library is not part of the C language proper, but an
  18. > >         environment that supports standard C will provide the function
  19. > >         declarations and type and macro definitions of this library.
  20. > >         (beginning of Appendix B).
  21. > > 
  22. >
  23. >That is a very interesting critique of K&R2.   I'd like to hear other people's
  24. >comments on how to reconcile that text with the truth and still have as much
  25. >confidence as we do have in that book.   Maybe "C language proper" can be just 
  26. >thought of as a concept that K&R alone define, but I don't know if I'm willing
  27. >to cut them that much rope.
  28.  
  29. I have utmost confidence in the book. There is a small list of well-known
  30. errors, most of which are in the programming examples (which an experienced
  31. user doesn't really look at, anyway).
  32.  
  33. You can add to the critique the fact that K&R2 contains example implementations
  34. of standard defined functions, with external linkage. For example, it shows you
  35. how to write your own malloc(). In keeping with the idea that the library is a
  36. separate entity, it doesn't warn you that malloc is a reserved external symbol
  37. in a hosted environment. You can write your own malloc, but it had better be
  38. ``static''. Of course, the sample implementation is very useful to beginners
  39. who wish to understand how simple memory allocation works, but it should be
  40. rectified to carry appropriate caveats. 
  41.  
  42. How to reconcile this with the truth is to realize that the book was published
  43. very early; in 1988 in fact. This was before the crystallization of the ANSI
  44. standard which was in 1989, no? The book is a classic work, so it might as well
  45. be left alone, with its few minor warts and all.
  46. -- 
  47.  
  48.